﻿using System;
using System.Collections.Generic;

//using EPiServer.Security;

namespace Cognifide.PowerShell.Shell.Storage
{
    [Serializable]
    public class ContextScript
    {
        public ContextScript()
        {
            Groups = new List<string>();
        }

        public string Title { get; set; }
        public string Description { get; set; }
        public string Warning { get; set; }
        public string Script { get; set; }
        public string Icon { get; set; }
        public List<string> Groups { get; set; }

/*
        public bool AvailableForPrincipal(PrincipalInfo principal)
        {
            if (Groups.Count == 0)
            {
                return true;
            }
            
            foreach (var userRole in Groups)
            {
                if (PrincipalInfo.CurrentPrincipal.IsInRole(userRole))
                {
                    return true;
                }
            }

            return false;

        }
*/
    }
}
